home *** CD-ROM | disk | FTP | other *** search
- class classes.misc.SuperRapidFire
- {
- var cMax;
- var c = 0;
- var c2 = 0;
- var c2Max = 20;
- var Name = "superRapidFire";
- function SuperRapidFire(max)
- {
- this.cMax = max;
- _root.superRapid = true;
- }
- function main()
- {
- this.c = this.c + 1;
- _root[_root.char].fireFreq = 3 + Math.floor(this.c / 150);
- if(this.c == this.cMax)
- {
- _root[_root.char].fireFreq = _root[_root.char].fireFreqOrig;
- _root.currentBoost = "";
- _root.superRapid = false;
- _root.removePowerUp("superRapidFire");
- }
- if(this.c < this.cMax / 3 && _root[_root.char].fire)
- {
- this.c2 = this.c2 + 1;
- this.c2Max /= 1.04;
- if(this.c2 >= Math.ceil(this.c2Max) + 1)
- {
- _root["gunSmoke" + this.c] = new classes.fx.GunSmoke(_root[_root.char].shotX,_root[_root.char].shotY,this.c);
- _root.addFX("gunSmoke" + this.c);
- this.c2 = 0;
- }
- }
- else if(this.c > this.cMax / 3 && _root[_root.char].fire)
- {
- this.c2 = this.c2 + 1;
- this.c2Max *= 1.03;
- if(this.c2 >= Math.ceil(this.c2Max) + 1)
- {
- _root["gunSmoke" + this.c] = new classes.fx.GunSmoke(_root[_root.char].shotX,_root[_root.char].shotY,this.c);
- _root.addFX("gunSmoke" + this.c);
- this.c2 = 0;
- }
- }
- }
- }
-